var mongoose = require('mongoose')
var Schema = mongoose.Schema
var DormitoryInspectionSchemaConfig = {
  versionKey: false,
  timestamps: {
    createdAt: 'created_at',
    updatedAt: false
  },
  typeKey: '$type'
}

var DormitoryInspectionSchema = new Schema({
  team: {$type: Schema.Types.ObjectId, ref: 'Team'},
  date: String,
  type: Number,
  judge: {$type: Schema.Types.ObjectId, ref: 'User'},
  violation: String,
  score: Number,
  delete: {$type: Boolean, default: false}
}, DormitoryInspectionSchemaConfig)

exports = module.exports = DormitoryInspectionSchema
